﻿@model jQueryExtensions.Samples.Models.OrderModel

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1>Buy Stock</h1>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Order With Custom Required Message</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.StockModelId) (Just Stock code)
        </div>
        <div class="editor-field">
            @Html.Partial("_StockSimpleAutoComplete")
            @Html.HiddenFor(model => model.StockModelId)
            @Html.ValidationMessageFor(model => model.StockModelId)
        </div>

        <div class="editor-label">
            <p>Choose the Stock you want to buy (Complete view attributes of Stock)</p> 
        </div>
        <div class="editor-field">
            @Html.Partial("_StockAnonymousTypeAutoComplete")
        </div>
        

        <div class="editor-label">
            @Html.LabelFor(model => model.Ammount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ammount)
            @Html.ValidationMessageFor(model => model.Ammount)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
